package chap04;

public class ZooApp {
    public static void main(String[] args) {
        Feeder feeder=new Feeder("张三");
        Cat cat=new Cat("猫咪花花");
        Dog dog =new Dog("金毛大黄");
        Food food=new Food("小鱼干");
        Food food1=new Food("肉骨头");
        feeder.feed(cat,food);
        feeder.feed(dog,food1);
        feeder.feed(new Animal() {
        @Override
            public void shout (){
            System.out.println("嗷嗷嗷");
        }

        },food1);
        feeder.feed(cat,new Food("猫草"));//匿名对象

    }
}
